package com.spancer.contentcenter.test.registbean;

import org.springframework.beans.factory.FactoryBean;
import org.springframework.stereotype.Component;

/**
 * author by: mars
 * Date: 2020/10/14 22:30
 * Description: 注入-方式3
 * > implements FactoryBean
 */
@Component
public class MyMonkey implements FactoryBean<Animal> {
    @Override
    public Animal getObject() throws Exception {
        return new Monkey();
    }

    @Override
    public Class<?> getObjectType() {
        return Animal.class;
    }
}
